import cv2 as cv
img = cv.imread('../../data/messi5.jpg')
if img is None:
   print("[ERROR] fail to read Image!!!")
   exit(0)
cv.imshow("pic", img)
cv.waitKey(0);
cv.destroyAllWindows()
#取HROI行[高'区间列[宽]区间
ball = img[280:340,330:390]
cv.imshow("pic",ball)
cv.waitKey(0);
# ROT 替换原图某个区域img[273:333,100:160]= ballcv.imshow("pic",img)cv.waitKey(0);
cv.destroyAllWindows()